package com.pets.springboot_petshop.service.impl;

import com.pets.springboot_petshop.entity.Homecarousel;
import com.pets.springboot_petshop.mapper.HomecarouselMapper;
import com.pets.springboot_petshop.service.HomecarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class HomecarouselServiceImpl implements HomecarouselService {
    @Autowired
    private HomecarouselMapper homecarouselMapper;

    @Override
    public Homecarousel selectHomecarousel(int id) {
        return homecarouselMapper.selectHomecarousel(id);
    }

    @Override
    public List<Homecarousel> findAll() {
        return homecarouselMapper.findAll();
    }

    @Override
    public List<Homecarousel> selectname(String name) {
        return homecarouselMapper.selectname(name);
    }


    @Override
    public int addHomecarousel(Homecarousel homecarousel) {
        return homecarouselMapper.addHomecarousel(homecarousel);
    }

    @Override
    public int deleteHomecarouselById(int id) {
        return homecarouselMapper.deleteHomecarouselById(id);
    }

    @Override
    public int updateHomecarouselById(Homecarousel homecarousel) {
        return homecarouselMapper.updateHomecarouselById(homecarousel);
    }
}
